/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

using NHibernate;
using BubzCommerce.CMS.Data.Base;

namespace BubzCommerce.CMS.Data.BusinessObjects
{
	/// <summary>
	/// ArticlepageLive object for NHibernate mapped table 'articlepage_live'.
	/// </summary>
	[Serializable]
    public partial class ArticlepageLive : BusinessBase<int>
	{
		#region Member Variables
		protected int _id;
		protected DateTime _dateposted;
		protected string _author;
		protected SitetreeLive _sitetreelive;
		#endregion
		#region Constructors
			
		public ArticlepageLive() {}
					
		public ArticlepageLive(int id, DateTime dateposted, string author, SitetreeLive sitetreelive) 
		{
			this._id= id;
			this._dateposted= dateposted;
			this._author= author;
			this._sitetreelive= sitetreelive;
		}

		public ArticlepageLive(int id, DateTime dateposted, SitetreeLive sitetreelive)
		{
			this._id= id;
			this._dateposted= dateposted;
			this._sitetreelive= sitetreelive;
		}
		
		#endregion
		#region Public Properties
		public  virtual int Id
		{
			get { return _id; }
			set {_id= value; }
		}
		public  virtual DateTime DatePosted
		{
			get { return _dateposted; }
			set {_dateposted= value; }
		}
		public  virtual string Author
		{
			get { return _author; }
			set {_author= value; }
		}
		public  virtual SitetreeLive SitetreeLive
		{
			get { return _sitetreelive; }
			set {_sitetreelive= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			ArticlepageLive castObj = (ArticlepageLive)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
